In networking, load balancing is a technique to distribute workload evenly across multiple resources, such as servers, computers, network links, processors, hard drives, or other resources, in order to get optimal resource utilization, maximize throughput, minimize response time, and avoid overload. Using multiple resources with load balancing, instead of a single resource, may also increase reliability through redundancy. One of the common applications of load balancing is to provide a single network (e.g., Internet) service from multiple servers, sometimes known as a server farm. For example, load-balanced systems may include popular web sites, large Internet Relay Chat networks, high-bandwidth File Transfer Protocol sites, Network News Transfer Protocol (NNTP) servers, and Domain Name System (DNS) servers. More recently, some load balancers have evolved to support databases, which are referred to as database load balancers.
The load balancing service is usually provided by a dedicated software program or hardware device, such as a multilayer switch. For example, for network services, a load balancer may be a software program that listens on the port where external clients connect to access the services. The load balancer forwards the service requests from the external clients to specific ones of the “backend” servers. For example, upon receiving a service request from an external client, the load balancer may select one of the backend servers based on the current workload of the individual servers, and forwards the service request to the selected backend server to be serviced. This allows the service requests to be serviced without the external clients ever knowing about the internal separation of functions. It also prevents the external clients from contacting the backend servers directly, which may have security benefits by hiding the structure of the internal network and preventing attacks on the kernel's network stack or unrelated services running on other ports.